function y = dixon(x)
% DIXON3DQ function
% x0=-1*ones(n,1);
n=length(x); y=(x(1)-1)^2;
for j=1:n-1
    y=y+(x(j)-x(j+1))^2; 
end
y=y+(x(n)-1)^2;


